package com.cai.xiaobai.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cai.xiaobai.entity.AnswerInfo;
import com.cai.xiaobai.entity.AnswerOptionContent;
import com.cai.xiaobai.entity.DTO.answerInfo.fillInFrom.FillInFromVO;
import com.cai.xiaobai.result.Result;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 答案数据表 服务类
 * </p>
 *
 * @author author
 * @since 2024-05-13
 */
public interface IAnswerInfoService extends IService<AnswerInfo> {

    /**
     * 根据条件筛选对应的数据
     */
    Result getHistory(String openId);

    /**
     * 通过问卷表id查询每个表对应的份数
     */
    Map<Long, Long> getFromAnswerNumber(List<Long> formIdList);

    /**
     * 通过问卷id拿到用户的该表的数据
     */
    Map<Long, AnswerOptionContent> getFromAnswerInfo(String fromId);

    /**
     * 用户填写问卷
     */
    Result fillInFrom(FillInFromVO fillInFromVO);
}
